﻿@{
    var xml = Model.Data as System.Xml.Linq.XElement;
}

<div class="report">
    
    <table class="key-value">
        <thead>
            <tr>
                <th colspan="2">System Log State</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Total Records</td>
                <td>@xml.Element("log").Attribute("totalRecs").Value</td>
            </tr>
            <tr>
                <td>Information Records</td>
                <td>@xml.Element("log").Attribute("totalInfs").Value</td>
            </tr>
            <tr>
                <td>Warnging Records</td>
                <td>@xml.Element("log").Attribute("totalWrns").Value</td>
            </tr>
            <tr>
                <td>Errors Records</td>
                <td>@xml.Element("log").Attribute("totalErrs").Value</td>
            </tr>
        </tbody>
    </table>
    <table>
        <thead>
            <tr>
                <th colspan="4">
                    Component Listing
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>Name</th>
                <th>Identifier</th>
                <th>Type</th>
                <th>Version</th>
            </tr>
            @foreach(var i in xml.Element("components").Elements())
            {
                <tr>
                    <td>@i.Attribute("name").Value</td>
                    <td>@i.Attribute("id").Value</td>
                    <td>@i.Attribute("type").Value</td>
                    <td>@i.Attribute("version").Value</td>
                </tr>
            }
        </tbody>
    </table>
</div>